+2008-04-06 Sven Neumann <sven@gimp.org>
+
+ * acinclude.m4: new file defining BABL_DETECT_CFLAGS() macro.
+
+ * configure.ac: set CFLAGS to get some extra compiler warnings.
+
+ * babl/babl-fish-stats.c (conversions): fixed old-style function
+ definition.
+
+ * Makefile.am: formatting.
+
2008-04-02 Mukund Sivaraman <muks@mukund.org>
Sparse fixes.
AUTOMAKE_OPTIONS = foreign dist-bzip2
-SUBDIRS = babl \
- extensions \
- tests \
- docs
+SUBDIRS = \
+ babl \
+ extensions \
+ tests \
+ docs
pkgconfigdir = $(libdir)/pkgconfig
pkgconfig_DATA = babl.pc
--- /dev/null
+dnl BABL_DETECT_CFLAGS(RESULT, FLAGSET)
+dnl Detect if the compiler supports a set of flags
+
+AC_DEFUN([BABL_DETECT_CFLAGS],
+[
+ $1=
+ for flag in $2; do
+ if test -z "[$]$1"; then
+ $1_save_CFLAGS="$CFLAGS"
+ CFLAGS="$CFLAGS $flag"
+ AC_MSG_CHECKING([whether [$]CC understands [$]flag])
+ AC_TRY_COMPILE([], [], [$1_works=yes], [$1_works=no])
+ AC_MSG_RESULT([$]$1_works)
+ CFLAGS="[$]$1_save_CFLAGS"
+ if test "x[$]$1_works" = "xyes"; then
+ $1="$flag"
+ fi
+ fi
+ done
+])
}
static void
-conversions ()
+conversions (void)
{
fprintf (output_file, "<h2>Conversions</h2><dl>\n");
babl_conversion_each (each_conv, NULL);
WEBSITE_LOCATION=public_html/babl/
AC_SUBST(WEBSITE_LOCATION)
+
if eval "test x$GCC = xyes"; then
case " $CFLAGS " in
*[\ \ ]-Wall[\ \ ]*) ;;
esac
fi
+BABL_DETECT_CFLAGS(extra_warnings, '-Wdeclaration-after-statement')
+CFLAGS="$CFLAGS $extra_warnings"
+
+BABL_DETECT_CFLAGS(extra_warnings, '-Wmissing-prototypes')
+CFLAGS="$CFLAGS $extra_warnings"
+
+BABL_DETECT_CFLAGS(extra_warnings, '-Wmissing-declarations')
+CFLAGS="$CFLAGS $extra_warnings"
+
+BABL_DETECT_CFLAGS(extra_warnings, '-Winit-self')
+CFLAGS="$CFLAGS $extra_warnings"
+
+BABL_DETECT_CFLAGS(extra_warnings, '-Wpointer-arith')
+CFLAGS="$CFLAGS $extra_warnings"
+
+BABL_DETECT_CFLAGS(extra_warnings, '-Wold-style-definition')
+CFLAGS="$CFLAGS $extra_warnings"
+
+
AC_PATH_PROG(INKSCAPE, inkscape, no)
AM_CONDITIONAL(HAVE_INKSCAPE, test "x$INKSCAPE" != "xno")